package com.ktjiaoyu.crm.controller;

import com.ktjiaoyu.crm.pojo.User;
import com.ktjiaoyu.crm.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName : UserController
 * @Description :
 * @Author : Lzz
 * @Date: 2023/11/22 08:59:53
 */
@Controller
public class UserController {

    @Resource
    UserService userService;

    @GetMapping(value = "/user/list")
    public String findUsers(String usrName, Long roleId, Model model){
        List<User> userList = userService.list();
        model.addAttribute("userList",userList);
        return "user/list";
    }

}
